package com.tboss.template.sample.dwr.treeviewType;

import java.util.HashMap;
import java.util.Map;

public enum TreeviewServiceType {

	HD("htmlDb", ".common.dwr.treeviewService.TreeviewHtmlDaoService"),
	JD("jsonDb", ".common.dwr.treeviewService.TreeviewJsonDaoService"),
	HF("htmlFile", ".common.dwr.treeviewService.TreeviewHtmlFileService"),
	JF("jsonFile", ".common.dwr.treeviewService.TreeviewJsonFileService"),
	HM("htmlManual", ".common.dwr.treeviewService.TreeviewHtmlManualService"),
	JM("jsonManual", ".common.dwr.treeviewService.TreeviewJsonManualService"),
	;
	
	private String key;
	private String value;
	private TreeviewServiceType(String key, String value){
		this.key = key;
		this.value = value;
	}
	private static final Map<String, TreeviewServiceType> lookup = new HashMap<String, TreeviewServiceType>();
	static{
		for(TreeviewServiceType o : TreeviewServiceType.values()){
			lookup.put(o.getKey(), o);
		}
	}
	
	public String getKey(){ return this.key; }
	public String getValue(){ return this.value; }
	public static TreeviewServiceType get(String key){
		return lookup.get(key);
	}
	
}
